Repository navigation
fix(test): handle CsvJobsTray auto-open race in SearchExport tray step - #30837
Conversation
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
✅ Playwright Results — workflow succeededValidated commit ✅ 53 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 3 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 51m 0s ⏱️ Max setup 1m 25s · max shard execution 6m 44s · max shard-job elapsed before upload 11m 58s · reporting 3s 🌐 133.72 requests/attempt · 1.35 app boots/UI scenario · 0.00% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
4e53410 to
0bfc66e
Compare
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
0bfc66e to
11c1495
Compare
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
21c1383 to
345e4c6
Compare
…Export PR #30615 added a useEffect that calls setOpen(true) when an export job reaches a terminal state, auto-opening the tray and hiding the launcher button. The old unconditional .click() then timed out because the button was no longer in the DOM. The initial isVisible() guard fixed one failure mode but introduced a new race: right after startAsyncExport there is a window where visibleJobs is still empty, so neither the launcher nor the tray has rendered yet. isVisible() returns false in that window, the click is skipped, and the /Exporting|Exported/ assertion times out. Fix: use locator.or() to wait until either the launcher button or the tray popover becomes visible, then gate the click on which one won. The tray popover is detected via its stable CSS class, requiring no data-testid on the component. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
345e4c6 to
9eb2ccf
Compare
Code Review ✅ Approved 4 resolved / 4 findingsGuards the launcher click in SearchExport.spec.ts to prevent auto-open race conditions and adds a data-testid to CsvJobsTray. Addressed stale OMSelectWidget state and stale async results, cleaned up commented CSS, and resolved the isVisible gate race condition finding. ✅ 4 resolved✅ Bug: OMSelectWidget snapshots static options in state, goes stale
✅ Quality: Async OMSelectWidget doesn't clear stale results on field switch
✅ Quality: Commented-out CSS block left in add-data-contract.less
✅ Edge Case: isVisible() gate reintroduces the auto-open race it aims to fix
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source |
…Export (#30837) PR #30615 added a useEffect that calls setOpen(true) when an export job reaches a terminal state, auto-opening the tray and hiding the launcher button. The old unconditional .click() then timed out because the button was no longer in the DOM. The initial isVisible() guard fixed one failure mode but introduced a new race: right after startAsyncExport there is a window where visibleJobs is still empty, so neither the launcher nor the tray has rendered yet. isVisible() returns false in that window, the click is skipped, and the /Exporting|Exported/ assertion times out. Fix: use locator.or() to wait until either the launcher button or the tray popover becomes visible, then gate the click on which one won. The tray popover is detected via its stable CSS class, requiring no data-testid on the component. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> (cherry picked from commit 53ffb0d)
…Export (open-metadata#30837) PR open-metadata#30615 added a useEffect that calls setOpen(true) when an export job reaches a terminal state, auto-opening the tray and hiding the launcher button. The old unconditional .click() then timed out because the button was no longer in the DOM. The initial isVisible() guard fixed one failure mode but introduced a new race: right after startAsyncExport there is a window where visibleJobs is still empty, so neither the launcher nor the tray has rendered yet. isVisible() returns false in that window, the click is skipped, and the /Exporting|Exported/ assertion times out. Fix: use locator.or() to wait until either the launcher button or the tray popover becomes visible, then gate the click on which one won. The tray popover is detected via its stable CSS class, requiring no data-testid on the component. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Root cause
PR #30615 added a
useEffecttoCsvJobsTraythat callssetOpen(true)whenever a job transitions to a terminal status. When the export completes quickly (typical in CI), the tray auto-opens before the test reaches the "Jobs tray surfaces" step.Once open, the launcher button is hidden by
{!open && !isEmpty(visibleJobs) && (...)}. The test's unconditional.getByRole('button', { name: /Background jobs|jobs running/ }).click()then times out.Fix
data-testid="csv-jobs-tray"to the tray popover so tests can check its visibility without relying on CSS class names.SearchExport.spec.ts: only click when the tray isn't already open.Test plan
SearchExport.spec.ts › Export queues a background job and downloads from the jobs traypasses when the export completes before the tray step (fast CI path)🤖 Generated with Claude Code
Summary by Gitar
@react-awesome-query-builder/uiand core componentsQueryBuilderOMConfig.tsxMultiSelectBaseto derive visible options from live items instead of snapshotting initial items on mountThis will update automatically on new commits.